/*
 * @Author: your name
 * @Date: 2021-11-03 11:08:52
 * @LastEditTime: 2021-11-04 10:18:58
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \ej-user-app\src\utils\auth.js
 */
import Cookies from 'js-cookie'
import {get } from "./axios"

// 多个项目的话可以改改token名字
const TokenKey = 'App-Token'

export function getToken() {
    return Cookies.get(TokenKey)
}

export function setToken(token) {
    return Cookies.set(TokenKey, token)
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}


export function getUserInfo() {
    return get("/user/info", { token: Cookies.get(TokenKey) })
}